有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

jade无效缩进上的java错误;应为0个空格

我在一个项目中工作,该项目的大部分代码都是由JADE technology编写的。我是杰德的新手。我没有从错误堆栈流中得到任何线索,我在下面发布了我的jade代码和错误,请分享你的建议,我写错了什么,我在哪里做更改

.row
    .col-md-12
        .panel.panel-primary
            .panel-heading
                h3 {{cc.header.subject}}
                ep-editable-date-time(model='cc.header')
            .panel-body
                .panel.panel-default(ng-repeat='step in cc.checklist.steps',
                data-step='{{step.stepPath[step.stepPath.length - 1].name}}')
                    .panel-heading
                        span.pull-right.checklist-controls(ng-if='cc.checkupType !== cc.types.DRIVEBY')
                            button.btn(ng-class="{'active': !step.skip, 'btn-default': step.skip, 'btn-success':!step.skip}",
                            ng-click='step.skip=!step.skip; step.skip ? step.noSelfCheckNeeded=true : noop')
                                span Include
                                    =" "
                                span.fa(ng-class="{'fa-square-o': step.skip, 'fa-check-square-o': !step.skip}")
                            =" "
                            span(ng-if='cc.checkupType === cc.types.SUPERVISOR')
                                button.btn(ng-class="{'active': !step.noSelfCheckNeeded, 'btn-success': !step.noSelfCheckNeeded, 'btn-default':step.noSelfCheckNeeded}",
                                ng-click='step.noSelfCheckNeeded=!step.noSelfCheckNeeded',
                                ng-disabled='step.skip')
                                    span Self Check
                                        =" "
                                    span.fa(ng-class="{'fa-check-square-o':!step.noSelfCheckNeeded, 'fa-square-o': step.noSelfCheckNeeded}")
                        h5.checklist-header(ng-bind='step.process.name')
                        h6
                            span(ng-repeat='s in step.stepPath')
                                span(ng-bind='s.name')
                                span(ng-show='!$last')
                                    =" > "
                    table.table
                        col
                        col(style='width: 60px')
                        thead
                            tr
                                th(colspan='2', style='text-align: right') In compliance?
                                th(style='width: 100px') Not-Applicable
                        tbody
                            tr(ng-repeat='b in step.behaviors')
                                td(ng-bind='b.name')
                                td
                                    span.bigcheck.compliance-checkbox
                                        label.bigcheck
                                            input.bigcheck(type='checkbox', ng-model='b.compliance', ng-disabled='step.skip')
                                            span.bigcheck-target
//I added these lines which started and ended with ** , It makes me a trouble please guided any one what I have missed ., 
                                **td
                                    span.bigcheck.compliance-checkbox
                                        label.bigcheck
                                            input.bigcheck(type='checkbox', ng-model='b.compliance', ng-disabled='step.skip')
                                            span.bigcheck-target**                                                        
            .panel-footer
                div(ng-if='cc.checkupType === cc.types.SUPERVISOR', style='text-align: center')
                    span(ng-if='!cc.selfCheckupNeeded()')
                        h6(ng-if='cc.anyStepsSelected()') Save and Return to Subject Dashboard
                        h6(ng-if='!cc.anyStepsSelected()') Include at least one Step before saving Checkups
                        button.btn.btn-success(ng-if='!cc.selfCheckupNeeded()',
                        ng-disabled='!cc.isCheckupDTValid() || !cc.anyStepsSelected()',
                        ng-click='cc.saveAndDontSelfCheckup()') Save Supervisor Checkup
                    span(ng-if='cc.selfCheckupNeeded()')
                        h6 Save and Start Self Checkup
                        button.btn.btn-primary.self-checkup-now-btn(ng-disabled='!cc.isCheckupDTValid()',
                        ng-click='cc.saveAndStartSelfCheckup()')
                            span.fa.fa-check-square-o
                            |  Self Checkup Now
                        =" "
                        button.btn.btn-danger.self-checkup-later-btn(ng-disabled='!cc.isCheckupDTValid()', ng-click='cc.saveAndSelfCheckupLater()')
                            span.fa.fa-check-square-o
                            |  Self Checkup Later
                div(ng-if='cc.checkupType === cc.types.SELF', style='text-align: center')
                    h6 Save and View Results
                    button.btn.btn-success.save-self-checkup(ng-disabled='!cc.isCheckupDTValid()',
                    ng-click='cc.saveAndDontSelfCheckup()')
                        span.fa.fa-check-square-o
                        |  Save Self Checkup
                div(ng-if='cc.checkupType === cc.types.DRIVEBY', style='text-align: center')
                    h6 Save Checkup
                    button.btn.btn-success(ng-disabled='!cc.isCheckupDTValid()', ng-click='cc.saveAndDontSelfCheckup()')
                        span.fa.fa-check-square-o
                        |  Save Checkup

错误堆栈流

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is class de.neuland.jade4j.exceptions.JadeLexerException checkup/checklist.jade:42
invalid indentation; expecting 0 spaces
Caused by: de.neuland.jade4j.exceptions.JadeLexerException: invalid indentation; expecting 0 spaces

共 (1) 个答案

  1. # 1 楼答案

    上面编辑的代码可以很好地与jade节点模块配合使用。 您只需将模板粘贴到jade-lang.com上,就可以对此类问题进行双重检查

    (您的模板在那里也可以正常工作)

    正如robertklep提到的,这可能是你的lexer的问题